package com.sjh.test.java8.time;

import java.time.LocalDateTime;
import java.time.Month;

public class LocalDateTimeTest3 {
    public static void main(String args[]) {

        LocalDateTimeTest3 tester = new LocalDateTimeTest3();
        tester.run();
    }

    public void run() {
        LocalDateTime currentTime = LocalDateTime.now();
        System.out.println("当前日期时间: " + currentTime);

        Month month = currentTime.getMonth();
        System.out.println("当前月份: " + month);

        int day = currentTime.getDayOfMonth();
        System.out.println("当前月中的第几天: " + day);

        int seconds = currentTime.getSecond();
        System.out.println("当前秒数: " + seconds);
    }
}
